<?php	echo $this->doctype(); ?>

<?php 
$this->layout()->loginForm = $this->action('login', 'users', 'admin');
?>
<html>
<head>
<?php 
	echo $this->loadSkin($this->skin);
	echo $this->headTitle();
	echo $this->headMeta();
	echo $this->headLink();
	echo $this->headStyle();
    echo $this->headScript();
    echo $this->jQuery();
?>

<!-- Sorttable library (average) -->
<script src="/scripts/libraries/sorttable.js"></script>


</head>

<script type="text/javascript">
function confirmDelete(delUrl) {
  if (confirm("Are you sure you want to delete")) {
	document.location = delUrl;
  }
}</script>
<body>

	<div id="pageWrapper" class="span-21">	
	
		<div id="header">
			<p>#header</p>	
		</div>
						
		<div id="nav">
			<p>#nav</p>
		</div>	

		<?php 
		if(!isset($_POST['noSidebar'])) {
		?>
		<div id="adminSidebar" class="span-6">
			<div id="roleManagement" class="span-5 sidebarLink">
				<a href="/admin/role/list/page/1" title="Roles" class="span-3">
					Quản lý vai trò
				</a>
			</div>
			
			<div id="userManagement" class="span-5 sidebarLink">
				<a href="/admin/users/list/page/1" title="Users" class="span-3">
					Quản lý người dùng
				</a>
			</div>
			
			<div id="routeManagement" class="span-5 sidebarLink">
				<a href="/admin/route/list/page/1" title="Routes" class="span-3">
					Quản lý tuyến
				</a>
			</div>
			
			<div id="tripManagement" class="span-5 sidebarLink">
				<a href="/admin/trip/list/page/1" title="Trips" class="span-3">
					Quản lý chuyến
				</a>
			</div>
			
			<div id="loginForm" class="span-6">
			<div class="span-6 fieldsetTitle">Đăng nhập</div>	
	            <?php echo $this->layout()->loginForm; ?>&nbsp;
	        </div>
			<p class="span-3">#sidebar</p>			
		</div>		
		
        <div id="adminMain" class="span-13 last"> 
            <?php echo $this->layout()->content; ?>&nbsp; 
        </div>
		<?php } else { ?>
        <div id="mainExpanded" class="span-20 last"> 
            <?php echo $this->layout()->content; ?>&nbsp; 
        </div>
        <?php }?>      
        
		<div id="footer">
			<p>#footer</p>
		</div>
	</div>
	

</body>

</html>